<!DOCTYPE html>
<html lang="en" class="no-js" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Strelitzia-后台管理系统</title>

    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">


    <link rel="stylesheet" type="text/css" href="/css/component.css"/>

</head>
<body>
<div th:text="${message}"></div>
<div class="demo-2">
    <div class="">
        <div id="large-header" class="large-header">
            <canvas id="demo-canvas"></canvas>

        </div>
    </div>
</div>
<div class="container">
    <div class="login_header">
        <span></span>
    </div>


    <div class="form_header">
        <h1 id="logo">login</h1>
        <h2 id="subheading">management system</h2>
    </div>
    <div class="signup_forms">
        <div id="signup_forms_container" class="signup_forms_container">
            <form class="signup_form_form" id="sign_form" method="post" action="/login">
                <div class="signup_account" id="signup_account">
                    <div class="form_user"><input type="text" name="username" placeholder="username" th:value="${username !=null ? username : 'admin'}" value="admin"
                                                  id="signup_email"></div>
                    <div class="form_password"><input type="password" name="password" placeholder="Password"
                                                      th:value="${password !=null ? password : ''}" id="signup_password"></div>
                </div>

                <button type="submit" id="signup_forms_submit"><span><strong>登录</strong></span></button>

            </form>

        </div>

    </div>


    <script src="/js/demo-2.js"></script>
    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <!--消息提示-->
    <script src="/js/bootstrap-notify.min.js"></script>
    <script type="text/javascript" src="/js/lightyear.js"></script>
    <script type="text/javascript">

        $(document).ready(function(){
            let message = '[[${message}]]'
            if(message !== '') {
                lightyear.loading('hide');
                lightyear.notify('[[${message}]]', 'danger', 100);
            }
        });
        $('#sign_form').on('submit', function () {
            let check = $('#signup_password').val() !== '' && $('#signup_email').val() !== ''
            if (!check) {
                lightyear.loading('hide');
                lightyear.notify('请输入账号或密码', 'danger', 100);
            }

            return check
        });
    </script>

</div>
</body>
</html>